package com.redis.springtest.jedis_test;

import redis.clients.jedis.Jedis;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @date 2020-08-07 下午12:24
 */
public class JedisApiTest {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("127.0.0.1", 6379);
        System.out.println("获取客户端信息" + jedis.getClient());
        System.out.println("清空Redis数据库" + jedis.flushAll());
        System.out.println("查看Redis信息" + jedis.info());
        System.out.println("获取数据库中key的数量" + jedis.dbSize());
        System.out.println("获取数据库的名字" + jedis.getDB());
        System.out.println("返回当前Redis服务器的时间" + jedis.time());
    }
}
